-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if principal's email is public #29929
Conversation
@srikarparsi Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
Hey! Sorry I forgot to complete the checklist/merge last Friday and there's some small conflicts with imports now. But the code looks good to me so I can review/merge once those are fixed. |
No problem, updated and tested again 👍🏽 |
Hey @marcochavezf! Do you also think you could add in screenshots whenever you get a chance? |
bump @marcochavezf |
Sorry I've been swamped with some other items. Also, I created a PR to flip the TU constants, so we can ask C+ for review once it's live |
Hey! Sorry, I'll take a look at this tomorrow, have had a lot of work with other priorities as well as school work. |
@@ -74,6 +75,9 @@ function IntroSchoolPrincipalPage(props) { | |||
if (!_.isEmpty(values.partnerUserID) && !Str.isValidEmail(values.partnerUserID)) { | |||
ErrorUtils.addErrorMessage(errors, 'partnerUserID', translate('teachersUnitePage.error.enterValidEmail')); | |||
} | |||
if (!_.isEmpty(values.partnerUserID) && LoginUtils.isEmailPublicDomain(values.partnerUserID)) { | |||
ErrorUtils.addErrorMessage(errors, 'partnerUserID', translate('teachersUnitePage.error.tryDifferentEmail')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: Do you think we should use a more descriptive error message? Maybe something on the lines of "Please use an email address associated with your school"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I think this message will be enough because we're already asking in the placeholder to enter a work email for the principal. This is only to cover the case when someone is trying to create a workspace with a public email, which probably is not an authentic school email.
Hey @marcochavezf! bump on the above comment. I can merge if you don't think it needs to be changed :) |
Thanks @srikarparsi, in the end, there is no clear path to flip the TU constants for external testing. Given that we're just checking a small validation I think just testing with web will be enough |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/srikarparsi in version: 1.4.14-0 🚀
|
🚀 Deployed to staging by https://github.com/srikarparsi in version: 1.4.14-0 🚀
|
@marcochavezf @srikarparsi Is this testable in Staging? Can you pls confirm the staging URL? or best way to reach the page |
Yes this is testable in staging: https://staging.new.expensify.com/teachersunite/i-am-a-teacher |
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.4.14-6 🚀
|
Details
In the flow "I'm a teacher", the user can enter a public email for the principal, this PR prevents that. cc @youssef-lr
Fixed Issues
Part of https://github.com/Expensify/Expensify/issues/327711
Tests
Offline tests
N/A
QA Steps
Same as dev steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop